Standard Equation of the Ellipse

Ax2+Bxy+Cy2+Dx+Ey=F General Form Conic

(1)(xh)2a2+(yk)2b2=1 Standard elliptical form requires a "1" on the right side.

In this section we will work with the general form conic ellipse. Along the way we will show how to get a parametric equation from that general form.

The general form equation for a conic will permit it to be rotated within the plane such that the major axis is oriented at any angle to the x axis. This Cartesian equation requires some linear algebra skills to be helpful. But there are a few things that we can discuss before that. The discriminant, B24AC is indicative of the conic shape. When the discriminant is less than zero then the shape will be elliptical, unless it is degenerate. The degenerate ellipse in elliptic form will be equal to zero. (2)(xh)2a2+(yk)2b2=0 So long as the xy term in the general form conic is zero, then you can transform the equation into elliptic form by completing the square in both x and y. Having done so, if you get the form of (2) and it is equal to zero then the ellipse is degenerate. B24AC<0Ellipse B24AC=0Parabola B24AC>0Hyperbola

When the equation is graphed, it will be axis aligned if and only if B=0. If B0, then there will be some amount of rotation.

All of the general equations written in variables x and y will reside in the x,y plane. In order to get out of the plane (i.e. from R2 to R3), we have to use (xyz)=(CPxCPyCPz)+acos(θ)u+bsin(θ)v0θ2π. which was discussed in the prior section. and we have to establish basis vectors in the new plane of interest. Since this section concerns equations in variables, x and y, we will be in the standard R2 plane.

Elliptic Center

From the general form, obtain the two partial derivatives, set them to zero, and solve for x and y to get the center of the ellipse. This works whether or not the ellipse is rotated.

Example: Find the center of an ellipse given by 5x210xy+16y230x20y=70.
Answer: fx=10x10y30=0 fy=10x+32y20=0 Solving simultaneously, x=58/11 and y=25/11. This works because we want the coefficients of the conic terms of degree 1 to be zero and that is achieved by the gradient equations being set to zero. Finding the center is the easiest way to translate the equation to the origin.

Translation

It is easy to translate the ellipse to the origin. For most everyone, that means pick up the ellipse and move it, without rotation, to have its center at (0,0).

Aside: Suppose we have a function such as x2+y2=0.12. This is a very small circle around the origin. What do we do in order to translate that circle to a new center, such as (2,3)? We probably recall that the equation of a circle with center (h,k) is (xh)2+(yk)2=r2, therefore to move the circle to (2,3), we would need to write (x2)2+(y3)2=.12 If we wanted to reverse this procedure, and move a circle from (h,k) to the origin, we just write (x+hh)2+(y+kk)2=0.12. It works the same for a more complicated equation, such as an ellipse.

To do that, we write the ellipse as A(x+h)2+B(x+h)(y+k)+C(y+k)2+D(x+h)+E(y+k)=F. Notice that we have algebraically moved F to the right hand side. If the algebra gets done correctly, then, when simplified, we will get a new set of coefficients and the terms in x and y will disappear.

Matrix Translation.png
Figure 1: The figure shows an original ellipse (red and not centered at the origin) and then the same ellipse translated to the origin. The equation of the original ellipse is 8x2+4xy+5y242x24y=63 and the equation of the translated ellipse is 8x2+4xy+5y2=2.25. On translation, the monomial terms for x and y have cancelled out with a consequent change in the remaining constant term.
Example
Suppose we start with ellipse 8x2+4xy+5y242x24y+63=0. Before we can translate it, we need to get its center. The two equations are the partial derivative of the ellipse with respect to x and the partial derivative of the ellipse with respect to y. f=(16x+4y424x+10y24)=0 We can solve these two equations simultaneously to get (x,y)=(9/4,3/2). Now that we know where the ellipse center is, we can set up the equations to move it to the origin. For each x term, substitute (x+9/4) and for each y term substitute (y+3/2). 8(x+94)2+4(x+94)(y+32)+5(y+32)242(x+94)24(y+32)+63=0 On expanding the equation and consolidating the constant term we get 8x2+4xy+5y294=0 and we see that the x and y monomials have been resolved.

General Conic Form

The general form of an ellipse given by Ax2+Bxy+Cy2+Dx+Ey+F=0 can be written in matrix form as (x,y)(AB/2B/2C)(xy)+(D,E)(xy)+F=0. The 2×2 matrix has eigenvectors which when orthogonalized (i.e. made into unit vectors) constitute the basis vectors for the ellipse. Using the example ellipse, 8x2+4xy+5y242x24y=63 Q:=(842425) The eigenvalues come from the characteristic equation, we have (λ2,λ1)=(8λ42425λ)=λ213λ+36=0 λ1=4λ2=9 To get the eigenvector, we write the vector equations: (8225)(xy)=λ1(xy) and solve either one with λ1=4. Using the top equation, 8x+2y=4x 4x=2y 2x=y let x=1,then y=2 u=(12) matches with λ=4 and with λ2, I used the other vector equation here, but it does not matter. What matters is which eigenvalue is plugged in. 2x+5y=9y 2x=4y x=2y let x=2, then y=1 v=(21)

These two vectors are graphed in figure 2 and a quick glance at the graph will show you that they align with the axes of the rotated ellipse. That could be useful.

There is one important thing to be done, and that is to normalize these eigenvectors. Otherwise, they will not serve a basis vectors in our parametric equation. u^=(12)(12)v^=(21)(21) Putting some calculator numbers into all of this gets CenterP=(9/43/2) u^=(0.89440.4472)v^=(0.44720.8944) and our parametrized equation can be written symbolically as (xy)=CenterP+acos(t)u^+bsin(t)v^0t2π. But we still haven't found values for a and b. To get a and b, we can set about to find the vertices. (Aside: a=3/4 and b=1/2.)

One method to find the vertices is to rotate the ellipse into axes alignment. Since we know the eigenvectors, we can easily determine the rotation angle needed. It is atan2(uy,ux) or atan2(vy,vx) or arg(u) or arg(v). The results which differ by π/2, are arg(u)=2.0344rad=θ1 arg(v)=0.4636rad=θ2 Our ellipse equation is 8x2+4xy+5y242x24y=63, and the substitutions for rotation are x=x1cosθy1sinθy=x1sinθ+y1cosθ which, after substituting and dropping the subscripts is 8(xcosθysinθ)2+4(xcosθysinθ)(xsinθ+ycosθ)+5(xsinθ+ycosθ)242(xcosθysinθ)24(xsinθ+ycosθ)=63

Matrix_Translation_1.png
Figure 2: The original ellipse with center point, CP, was translated to the origin and then rotated to be aligned with the axes. Once aligned, the distance from the origin to either ellipse intersection with the x-axis is distance a. Then the vertices of the original ellipse can be obtained from the vector equation V=CP±au^.
So that equation is oriented with the axes and after plugging in θ=2.0344rad, we get 4x2+9y2=94. One easy way to find the vertices is to set y=0 and solve for x, and vice versa. Horizontal Vertex=916=34=a Vertical Vertex=14=12=b Now we can compute the vertices of the original ellipse using vector projection. (V1V2)=CP±au^=CP±a(0.89440.4472)=(1.91462.1708) and (2.58540.8292)

Example: Given the ellipse 0.4x20.65xy+0.8y2+4x+6.5y=40, find the semi-major axis and vertices of the major axis.
Answer: Get the center point of the ellipse by setting the gradient equations to zero and solving for x and y. f=(45x1320y+485y1320x+132)=(00) CP=(xy)=(42503433120343)(12.3919.096) Now translate the equation to the origin. 410(x4250343)265100(x4250343)(y3120343)+810(y3120343)2+4(x4250343)+6510(y3120)=40 after expanding, multiplying both sides by 2, and simplifying, (3)45x21310xy+85y2=80+37280343 which is a rotated ellipse centered at (0,0).
example_ellipse.png
Figure 2: The original ellipse has center point CP. Its equation is 0.4x20.65xy+0.8y2+4x+6.5y=40. After translation to the origin, we can use eigenvectors u and v to find the vertices of the ellipse at the origin. That will yield semi-axes, a and b. We can then translate the vertices back to CP to get the original vertices, V1 and V2.
Next we will write the quadratic form 2×2 matrix. Q=(451320132085) The characteristic equation from Q is the Determinant(QλI) where I is the 2×2 identity matrix. 400λ2960λ+343400=0 (λ1λ2)=(233+2420233+2420) The eigenvector equations are (45x1320y1320x+85y)=λ(xy) Letting x=1, and using λ1 we get u=(1233813) matching with λ1 which is the long axis. Letting x=1, and using λ2 we get v=(1233813)matching with λ2 which is the short axis. We could make a line out of vector u. If we noticed that slope is slope=uyux0.559 and the line intersecting the origin is y=0.559x. That could be substituted into (3) and we could solve for the vertices of the origin centered ellipse. Here is the equation: 45x21310xy+85y2=80+37280343 and here is the substitution: 45x21310x(x233813)+85(x233813)2=9840343 11690x2(425233+7456)=9840343 which can be solved for the x part of the two vertices. x=±2057318(425233+7456)79919=±7.075 and plugged in to get the y part. y=±7.075(233813)=±3.953. That is, for the origin vertices, (4)(xy)=(7.0753.953)and (7.0753.953) To get the value for a, we just need the distance from a vertex to the origin. a=(7.0753.953)=8.104 and to get the original ellipse vertices, we can translate (4) to our center point. Vertices=(42503433120343)±(7.0753.953) (V1V2)=((5.316,5.143)(19.465,13.050))